<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>来搭配网管理后台</title>
    <link rel="stylesheet" type="text/css" href="/static/admin/plugins/PACE/themes/blue/pace-theme-flash.css">
    <script type="text/javascript" src="/static/admin/plugins/PACE/pace.min.js"></script>
    <link rel="stylesheet" type="text/css" href="/static/admin/plugins/bootstrap/dist/css/bootstrap.min.css">
    <!-- Fonts-->
    <link rel="stylesheet" type="text/css" href="/static/admin/plugins/themify-icons/themify-icons.css">
    <link rel="stylesheet" type="text/css" href="/static/admin/plugins/animo.js/animate-animo.min.css">
    <link rel="stylesheet" type="text/css" href="/static/admin/build/css/umega.css">
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries-->
    <!-- WARNING: Respond.js doesn't work if you view the page via file://-->
    <!--[if lt IE 9]>
    <script type="text/javascript" src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script type="text/javascript" src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
    <!-- Main Sidebar start-->
    <aside class="main-sidebar pinned">
        <div class="brand"><a href="index.html" class="logo"><i class="ti-underline"></i>
            <h2>来搭配后台<span>v1.0</span></h2></a><a href="javascript:;" role="button" class="sidebar-toggle visible-xs-block"><i class="ti-close text-white"></i></a></div>
        <div class="profile"><img src="{if session('admin_user_info.avatar')}/static/admin/build/images/users/04.jpg{/if}" alt="" class="avatar img-circle"><span class="status bg-success"></span>
            <h5 class="text-white mb-5">{:session('admin_user_info.user_name')}</h5>
            <div class="text-muted">{:session('admin_user_info.role_name')}</div>
        </div>
        <!-- Nav tabs-->
        <ul role="tablist" class="nav nav-tabs nav-justified nav-sidebar">
            <li role="presentation" class="active"><a href="#menu" aria-controls="menu" role="tab" data-toggle="tab"><i class="ti-menu"></i></a></li>
            <li role="presentation"><a href="#portfolio" aria-controls="portfolio" role="tab" data-toggle="tab"><i class="ti-user"></i></a></li>
            <li role="presentation" class="bubble"><a href="#email" aria-controls="email" role="tab" data-toggle="tab"><i class="ti-email"><span class="dot bg-danger"></span></i></a></li>
            <li role="presentation"><a href="#setting" aria-controls="setting" role="tab" data-toggle="tab"><i class="ti-server"></i></a></li>
        </ul>
        <!-- Tab panes-->
        <div class="tab-content nav-sidebar-content">
            <div id="menu" role="tabpanel" class="tab-pane fade in active">
                <ul class="list-unstyled navigation mb-0">
                    {foreach $menu as $val}
                    <li class="panel">
                        {if isset($val['sub_menu'])}
                            <a role="button" data-toggle="collapse" data-parent=".navigation" href="#collapse{$val['id']}" aria-expanded="false" aria-controls="collapse{$val['id']}" class="collapsed">
                        {else}
                            <a href="{:url($val['url'])}" class="bubble">
                        {/if}
                            <i class="{$val['css_icon']}"></i>
                            {$val['name']}
                        </a>
                        {if isset($val['sub_menu'])}
                            <ul id="collapse{$val['id']}" class="list-unstyled collapse">
                                {foreach $val['sub_menu'] as $v}
                                <li>
                                    <a href="javascript:void(0);" _href="{:url($v['url'])}">
                                        {$v['name']}
                                    </a>
                                </li>
                                {/foreach}
                            </ul>
                        {/if}
                    </li>
                    {/foreach}


                </ul>

            </div>
        </div>
    </aside>

    <header>
        <div class="search-bar closed">
            <form>
                <div class="input-group input-group-lg">
                    <input type="text" placeholder="Search for..." class="form-control"><span class="input-group-btn">
                    <button type="button" class="btn btn-default search-bar-toggle"><i class="ti-close"></i></button></span>
                </div>
            </form>
        </div>
        <div class="brand pull-left"><a href="index.html" class="logo"><i class="ti-underline"></i>
            <h2>MEGA<span>app</span></h2></a></div><a href="javascript:;" role="button" class="sidebar-toggle pull-left icon"><i class="ti-menu text-muted"></i></a>
        <form class="mt-15 mb-15 pull-left hidden-xs hidden-sm">
            <div class="form-group has-feedback mb-0">
                <input type="text" aria-describedby="inputSearchFor" placeholder="Search for..." class="form-control rounded"><span aria-hidden="true" class="ti-search form-control-feedback"></span><span id="inputSearchFor" class="sr-only">(default)</span>
            </div>
        </form>
        <ul class="notification-bar list-inline pull-right">
            <li class="dropdown"><a id="dropdownMenu2" href="#" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" class="dropdown-toggle bubble icon"><i class="ti-world text-muted"></i><span class="badge bg-danger">4</span></a>
                <div aria-labelledby="dropdownMenu2" class="dropdown-menu dropdown-menu-right dm-medium fs-12 animated fadeInDown">
                    <ul class="media-list">
                        <li class="media"><a href="javascript:;">
                            <div class="media-left avatar"><img src="build/images/users/02.jpg" alt="" class="media-object img-circle"><span class="status bg-success"></span></div>
                            <div class="media-body">
                                <h6 class="media-heading">Mark Barnett</h6>
                                <p class="text-muted mb-0">Sent you a new message</p>
                            </div>
                            <div class="media-right text-nowrap">
                                <time datetime="2015-12-10T20:50:48+07:00" class="fs-11">9 mins</time>
                            </div></a></li>
                        <li class="media"><a href="javascript:;">
                            <div class="media-left avatar"><img src="build/images/users/11.jpg" alt="" class="media-object img-circle"><span class="status bg-danger"></span></div>
                            <div class="media-body">
                                <h6 class="media-heading">Alexander Gilbert</h6>
                                <p class="text-muted mb-0">Sent you a new email</p>
                            </div>
                            <div class="media-right text-nowrap">
                                <time datetime="2015-12-10T20:42:40+07:00" class="fs-11">15 mins</time>
                            </div></a></li>
                        <li class="media"><a href="javascript:;">
                            <div class="media-left avatar"><img src="build/images/users/12.jpg" alt="" class="media-object img-circle"><span class="status bg-success"></span></div>
                            <div class="media-body">
                                <h6 class="media-heading">Amanda Collins</h6>
                                <p class="text-muted mb-0">You have 8 unread messages</p>
                            </div>
                            <div class="media-right text-nowrap">
                                <time datetime="2015-12-10T20:35:35+07:00" class="fs-11">22 mins</time>
                            </div></a></li>
                        <li class="media"><a href="javascript:;">
                            <div class="media-left avatar"><img src="build/images/users/13.jpg" alt="" class="media-object img-circle"><span class="status bg-warning"></span></div>
                            <div class="media-body">
                                <h6 class="media-heading">Christian Lane</h6>
                                <p class="text-muted mb-0">Commented on your post</p>
                            </div>
                            <div class="media-right text-nowrap">
                                <time datetime="2015-12-10T20:27:48+07:00" class="fs-11">30 mins</time>
                            </div></a></li>
                    </ul>
                    <div class="dropdown-footer text-center p-10"><a href="javascript:;" class="fw-500 text-muted">See all notifications</a></div>
                </div>
            </li>
            <li><a href="{:url('admin/index/logout')}" role="button" class="icon"><i class="ti-power-off text-muted"></i></a></li>
        </ul>
    </header>

    <section class="wrapper" style="min-height: 100%;">
        <div class="page-header clearfix">
            <div class="pull-left">
                <h4 class="mt-0 mb-5">欢迎使用来搭配后台管理系统</h4>
                <p class="text-muted mb-0">如果发现在需要高级权限，请联系超级管理员开通。</p>
            </div>
        </div>
        <div class="main-content container-fluid">
            <div class="row">
                <div class="col-md-3 col-sm-6">
                    <div class="widget text-center">
                        <div class="widget-body">
                            <div class="clearfix">
                                <div class="pull-left"><a href="javascript:;" class="widget-reload"><i class="ti-control-record text-muted"></i></a></div>
                            </div>
                            <h5 class="mb-5">新增作品</h5>
                            <div class="fs-36 fw-600 mb-20 counter">12</div>
                            <div id="esp-comment" data-percent="75" style="height: 140px; width: 140px; line-height: 120px; padding: 10px;" class="easy-pie-chart fs-36"><i class="ti-comment-alt text-muted"></i></div>
                            <div class="clearfix mt-20">
                                <div class="pull-left">
                                    <div class="fs-12">今天</div>
                                    <div class="text-success">7</div>
                                </div>
                                <div class="pull-right">
                                    <div class="fs-12">昨天</div>
                                    <div class="text-danger">5</div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-3 col-sm-6">
                    <div class="widget text-center">
                        <div class="widget-body">
                            <div class="clearfix">
                                <div class="pull-left"><a href="javascript:;" class="widget-reload"><i class="ti-control-record text-muted"></i></a></div>
                                <div class="pull-right"><a href="javascript:;" class="widget-remove"><i class="ti-trash text-muted"></i></a></div>
                            </div>
                            <h5 class="mb-5">New Photos</h5>
                            <div class="fs-36 fw-600 mb-20 counter">350</div>
                            <div id="esp-photo" data-percent="55" style="height: 140px; width: 140px; line-height: 120px; padding: 10px;" class="easy-pie-chart fs-36"><i class="ti-image text-muted"></i></div>
                            <div class="clearfix mt-20">
                                <div class="pull-left">
                                    <div class="fs-12">Today</div>
                                    <div class="text-danger">-0.23%</div>
                                </div>
                                <div class="pull-right">
                                    <div class="fs-12">Yesterday</div>
                                    <div class="text-success">+1.02%</div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-3 col-sm-6">
                    <div class="widget text-center">
                        <div class="widget-body">
                            <div class="clearfix">
                                <div class="pull-left"><a href="javascript:;" class="widget-reload"><i class="ti-control-record text-muted"></i></a></div>
                                <div class="pull-right"><a href="javascript:;" class="widget-remove"><i class="ti-trash text-muted"></i></a></div>
                            </div>
                            <h5 class="mb-5">New Users</h5>
                            <div class="fs-36 fw-600 mb-20 counter">890</div>
                            <div id="esp-user" data-percent="30" style="height: 140px; width: 140px; line-height: 120px; padding: 10px;" class="easy-pie-chart fs-36"><i class="ti-user text-muted"></i></div>
                            <div class="clearfix mt-20">
                                <div class="pull-left">
                                    <div class="fs-12">Today</div>
                                    <div class="text-success">+0.09%</div>
                                </div>
                                <div class="pull-right">
                                    <div class="fs-12">Yesterday</div>
                                    <div class="text-danger">-0.02%</div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-3 col-sm-6">
                    <div class="widget text-center">
                        <div class="widget-body">
                            <div class="clearfix">
                                <div class="pull-left"><a href="javascript:;" class="widget-reload"><i class="ti-control-record text-muted"></i></a></div>
                                <div class="pull-right"><a href="javascript:;" class="widget-remove"><i class="ti-trash text-muted"></i></a></div>
                            </div>
                            <h5 class="mb-5">New Feedbacks</h5>
                            <div class="fs-36 fw-600 mb-20 counter">1,609</div>
                            <div id="esp-feedback" data-percent="20" style="height: 140px; width: 140px; line-height: 120px; padding: 10px;" class="easy-pie-chart fs-36"><i class="ti-receipt text-muted"></i></div>
                            <div class="clearfix mt-20">
                                <div class="pull-left">
                                    <div class="fs-12">Today</div>
                                    <div class="text-success">+3.29%</div>
                                </div>
                                <div class="pull-right">
                                    <div class="fs-12">Yesterday</div>
                                    <div class="text-success">+2.32%</div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-12">
                    <div class="widget clear">
                        <div class="widget-heading clearfix">
                            <h3 class="widget-title pull-left">订单统计</h3>
                        </div>
                    </div>
                </div>
                <div class="col-md-12">
                    <div class="widget no-border">
                        <table id="order-table" cellspacing="0" width="100%" class="table table-hover mb-0 dt-responsive nowrap">
                            <thead>
                            <tr>
                                <th style="width:16%">订单ID</th>
                                <th style="width:37%">用户</th>
                                <th style="width:20%">添加时间</th>
                                <th style="width:12%">佣金</th>
                                <th style="width:15%">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td>#6546</td>
                                <td>
                                    <div class="media">
                                        <div class="media-left avatar"><img src="build/images/users/10.jpg" alt="" class="media-object img-circle"><span class="status bg-success"></span></div>
                                        <div class="media-body">
                                            <h5 class="media-heading">Philip Fernandez</h5>
                                            <p class="text-muted mb-0">489 Rhapsody Street</p>
                                        </div>
                                    </div>
                                </td>
                                <td>20 Feb 2016</td>
                                <td>$140.00</td>
                                <td class="text-center text-success"><i class="ti-check"></i></td>
                            </tr>

                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- jQuery-->
    <script type="text/javascript" src="/static/admin/plugins/jquery/dist/jquery.min.js"></script>
    <!-- Bootstrap JavaScript-->
    <script type="text/javascript" src="/static/admin/plugins/bootstrap/dist/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="/static/admin/plugins/layer/layer.js"></script>
    <!-- Animo.js-->
    <script type="text/javascript" src="/static/admin/plugins/animo.js/animo.min.js"></script><!-- Bootstrap Progressbar-->
    <script type="text/javascript" src="/static/admin/plugins/bootstrap-progressbar/bootstrap-progressbar.min.js"></script>
    <!-- Custom JS-->
    <script type="text/javascript" src="/static/admin/build/js/app.js"></script>
    <script type="text/javascript" src="/static/admin/js/core.js"></script>
    <script>
        $(function () {
            $(".wrapper").css('min-height',window.innerHeight-64);
            $("#menu li:eq(0)").children('a:first').addClass('active');
            $("#menu li a").click(function () {
                var url = $(this).attr('_href');
                console.log(url);
                $("#menu li a").removeClass('active');
                $(this).addClass('active');
                if(url){
                    Pace.restart();
                    $.ajax(
                        {
                            url: url,
                            success: function (data) {
                                $(".wrapper").html(data);
                            },
                            complete: function (req,status) {
                                console.log(req.status);
                            }
                        }
                    );
                }

            });
        });
    </script>
</body>
</html>